package main.common.product.impl;

import main.common.product.Fruit;

public class Mango implements Fruit {
    private String name = "芒果";
    private double price;
    private double discount;


    public Mango(double price, double discount) {
        this.price = price;
        this.discount = discount;
    }

    @Override
    public double calculatePrice(int weight) {
        return weight * price * (1 - discount);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public double getDiscount() {
        return discount;
    }

    public void setDiscount(double discount) {
        this.discount = discount;
    }
}
